<tagLib name="html" />
<include file="Public:header" />

<div class="container" id="cpcontainer">
    <div class="itemtitle">
        <h3>{$Think.lang.db.manage_db}</h3>
        <ul class="tab1">
            <li class="current"><a href="__URL__/dbExport"><span>{$Think.lang.db.backup}</span></a></li>
            <li><a href="__URL__/dbImport"><span>{$Think.lang.db.restore}</span></a></li>
            <li><a href="__URL__/dbOptimize"><span>{$Think.lang.db.optimize}</span></a></li>
        </ul>
    </div>
    <p class="tips">{$Think.lang.db.backup_tips}</p>
    <form name="cpform" method="post" action="__URL__/dbExport">
    <input type="hidden" name="op" value="save" />
    <table class="tb tb2">        
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.db.backup_file_type}:</td></tr>
        <tr>
            <td class="vtop rowform">
                <ul onmouseover="altStyle(this);">
                    <li><input type="radio" name="file_type" value=".zip" checked="checked" />{$Think.lang.db.zip}</li>
                    <li><input type="radio" name="file_type" value=".gz" />{$Think.lang.db.gzip}</li>
                    <li><input type="radio" name="file_type" value=".bz2" />{$Think.lang.db.bzip2}</li>
                    <li><input type="radio" name="file_type" value=".sql" />{$Think.lang.db.text}</li>
                </ul>
            </td>
            <td class="vtop tips2"></td>
        </tr>
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.db.target_table}:</td></tr>
        <tr>
            <td class="vtop rowform">
                <ul onmouseover="altStyle(this);">
                    <li><input id="all_backup" type="radio" name="target_table" value="all" checked /><label for="all_backup">{$Think.lang.db.all_table}</label></li>
                    <li><input id="custom_backup" type="radio" name="target_table" value="custom" /><label for="custom_backup">{$Think.lang.db.custom_table}</label></li>
                </ul>
            </td>
            <td class="vtop tips2"></td>
        </tr>
        <tbody id="body_custom" style="display:none">
        <tr><td class="td25" colspan="2"><input class="checkbox" name="chkall" onclick="checkAll('prefix', this.form, 'tables', 'chkall', true)" type="checkbox" id="chkalltables" /><label for="chkalltables"> {$Think.lang.check_all}</td></tr>
        <tr>
            <td colspan="2">
                <ul class="dblist" onmouseover="altStyle(this);">
                    <volist name="tables" id="vo">
                    <li><input type="checkbox" name="tables[]" value="{$vo}" class="checkbox" />{$vo}</li>
                    </volist>
                </ul>
            </td>
        </tr>
        </tbody>
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.db.vol_size}:</td></tr>
        <tr>
            <td class="vtop rowform"><input name="vol_size" value="{$volSize}" type="text" class="txt" /></td>
            <td class="vtop tips2">{$Think.lang.db.vol_explain}</td>
        </tr>
        <tr class="nobg"><td colspan="15"><div class="fixsel"><input class="btn" type="submit" value="{$Think.lang.submit}" /></div></td></tr>
    </table>
    </form>
</div>

<script type="text/javascript">
$(function(){
   $('#all_backup').click(function(){
      $('#body_custom').hide();
   });
   $('#custom_backup').click(function(){
      $('#body_custom').show();
   });
});
</script>

<include file="Public:footer" />
